import request from '@/utils/request'

// 获取公司架构信息
export function getDepartmentAPI() {
  return request.get('/company/department')
}

// 新增架构信息
export function addDepartmentAPI(data) {
  return request.post('/company/department', data)
}

// 获取部门详情
export function getDepartDetailAPI(id) {
  return request.get('/company/department/' + id)
}

// 根据id修改部门详情
export function editDepartDetailAPI(data) {
  return request.put(`/company/department/${data.id}`, data)
}

// 根据id删除部门
export function delDepartmentAPI(id) {
  return request.delete('/company/department/' + id)
}
